package com.wisdudu.blank.ui.common.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.wisdudu.blank.ui.common.ImageGlanceFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by qyf on 2016/5/5.
 */
public class ImageGlancePagerAdapter extends FragmentPagerAdapter {

    private final List<String> mPaths;

    public ImageGlancePagerAdapter(FragmentManager fm, ArrayList<String> paths) {
        super(fm);
        mPaths = paths;
    }

    @Override
    public int getCount() {
        return mPaths.size();
    }

    @Override
    public Fragment getItem(int position) {
        return ImageGlanceFragment.newInstance(mPaths.get(position));
    }
}
